﻿using System;
using System.Windows.Forms;

using Detective.View.ConsoleViews.Base;

namespace Detective.View.ConsoleViews
{
    public class MailView : BaseChildView
    {
        public MailView()
        {
            Width = Console.WindowWidth - 4;
            Height = 13;
        }

        public override void RefreshView()
        {
            ClearViewAndWriteBorder();

            WriteLine("1.", '_');
            WriteLine("2.", '_');
            WriteLine("3.", '_');
            WriteLine("4.", '_');
            WriteLine("5.", '_');
            WriteLine("6.", '_');
            WriteLine("7.", '_');
            WriteLine();
            Write("<- X"); WriteToRight("Письма отсутствуют");
        }

        public override void OnKeyDown(KeyEventArgs arg)
        {
            switch (arg.KeyCode)
            {
                case Keys.Left:
                    Parent.CloseMe(this);
                    break;
                case Keys.D1:
                    Parent.Show<MailView>();
                    break;
            }
        }
    }
}
